from models.base import BaseModel, db


class AlbumInfo(BaseModel):
    __tablename__ = 'album_info'
    __table_args__ = {'comment': '短剧信息表模型'}

    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
    dy_album_id = db.Column(db.BigInteger, nullable=False, comment='抖音短剧ID')
    title = db.Column(db.String(255), nullable=False, comment='短剧标题')
    seq_num = db.Column(db.Integer, nullable=False, comment='总集数')
    covers = db.Column(db.JSON, nullable=False, comment='封面图')
    release_year = db.Column(db.Integer, nullable=False, comment='发行年份')
    album_status = db.Column(db.String(255), nullable=False, comment='短剧更新状态')
    recommendation = db.Column(db.String(255), nullable=False, comment='短剧推荐语')
    introduction = db.Column(db.String(500), nullable=False, comment='短剧简介')
    tags = db.Column(db.JSON, nullable=False, comment='短剧类目标签')
    qualification = db.Column(db.String(255), nullable=False, comment='资质状态')
    current_dy_version = db.Column(db.String(255), nullable=False, comment='当前抖音版本号')
    online_dy_version = db.Column(db.Integer, nullable=False, comment='上线的抖音版本号')

